1. Field
The present description relates to a method, system, and computer program for assigning input/output ports in a storage area network.
2. Description of Related Art
A storage area network (SAN) is frequently used to couple remote computer storage devices such as disk arrays, tape libraries, optical jukeboxes or other storage devices, to hosts in a manner which permits the storage devices to appear to the operating systems of the hosts as locally attached to the hosts. Fibre Channel (FC) is a high speed networking technology in which signals may be transmitted over various transmission media including fiber optic cable or twisted pair copper cables, for example.
A storage controller may have multiple servers which are assigned input/output (I/O) tasks by the hosts. The I/O tasks may be directed to specific volumes in the storage. The storage controller may further have multiple input/output (I/O) adapters such as host adapters which enable the servers to communicate with the hosts, and device adapters which enable the servers of the storage controller to communicate with the storage devices. An I/O adapter may have multiple CPUs which receive input/output requests from one or more servers of the storage controller to perform input/output operations in which data is read from or written to storage through various I/O ports of the I/O adapter. I/O adapters frequently have a shared resource environment in which resources, such as hardware resources such as I/O ports, and memory resources such as data structures in memory, for example, may be shared by multiple CPUs. An example of a shared resource environment used in I/O adapters is the Symmetric Multiprocessing (SMP) environment, for example.
Access to the shared resources may be controlled using appropriate rules such as single ownership or shared ownership rules, for example. In one typical shared resource environment, access to a shared resource may be accomplished by using lock words in shared memory data structures that control access to the resource being accessed. Another method known in the art is to group associated data structures for various resources together in a task control block that is allocated each time a task begins and is locked and unlocked by each CPU as operations of the task are carried out.
In a typical shared resource environment, each of the I/O ports will have its work performed almost entirely under the control of a single CPU until the tasks of that I/O port are completed. Such an arrangement is believed to improve the performance of a multi-CPU adapter by, for example, reducing cache thrashing.
A list of the I/O port or ports assigned to a particular CPU may be stored in an element of a data structure for that CPU. The particular CPU assigned to a particular I/O port may also be identified by an appropriate CPU owner ID stored in an element of a data structure assigned to the particular I/O port.
The CPU assigned a particular I/O port may prevent other CPUs from accessing that particular I/O port by setting a lock in an element of a data structure assigned to that particular I/O port. Once the I/O port is no longer owned by a particular CPU, the lock element may be cleared.
The I/O tasks to be performed in connection with a particular I/O port may be identified in an element of a data structure assigned to a particular I/O port. The I/O work assignments performed in connection with an I/O port include, for example, communicating with the particular communication protocol hardware, such as Fibre Channel Optics hardware, for example, submitting work to a direct memory access (DMA) engine in logic hardware such as an ASIC, for example, in the I/O adapter to move data in and out of one or more of the caches, etc.